@extends('backend::layout')
@section('title',$page_title)
@section('content')
    @component('backend::component.form.form')
        @slot('page_title') {{$page_title}} @endslot
        @slot('icon') hcl-currency-list @endslot
        @slot('formId') currency @endslot
        @slot('action')
            @if(!isset($info))
                {{route('d_Currency_create')}}
            @else
                {{route('d_Currency_update',['id'=>$info->id])}}
            @endif

        @endslot

        @component('backend::component.form.form-group')
            @slot('title') 币种标识 @endslot
            @component('backend::component.form.input')
                @slot('name') name @endslot
                @slot('value') {{$info->name ?? ''}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 币种名称 @endslot
            @component('backend::component.form.input')
                @slot('name') title @endslot
                @slot('value') {{$info->title ?? ''}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 币种价值 @endslot
            @component('backend::component.form.input')
                @slot('name') price @endslot
                @slot('value') {{$info->price ?? 1}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 状态 @endslot
            <div>
                @foreach(['0'=>'禁用','1'=>'启用'] as $value=>$title)
                    @component('backend::component.radio')
                        @slot('title') {{$title}} @endslot
                        @slot('name') status @endslot
                        @slot('value') {{$value}} @endslot
                        @if($value == ($info->status ?? 1))
                            @slot('checked') checked @endslot
                        @endif
                    @endcomponent
                @endforeach
            </div>
        @endcomponent
        @slot('buttons')
            @component('backend::component.form.button')
                @slot('title') 提交 @endslot
                @slot('params') {"formId":"#currency"} @endslot
                @slot('class') btn-min-width ajax-form @endslot
            @endcomponent
            @component('backend::component.form.button')
                @slot('title') 重置 @endslot
                @slot('type') reset @endslot
                @slot('color') danger @endslot
                @slot('class') btn-min-width @endslot
            @endcomponent
        @endslot
    @endcomponent
@endsection
@push('scripts')
    <script>

    </script>
@endpush